<template>
  <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      :mode="verticalMode"
      :unique-opened="isUniqueOpened"
      :default-openeds="openeds"
      :collapse-transition="isCollapseTransition"
      :collapse="isCollapse"
      @open="handleOpen"
      @close="handleClose" style="height: 100%">
    <el-submenu index="1">
      <template slot="title">
        <i class="el-icon-postcard"></i>
        <span>简历管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1">简历管理</el-menu-item>
        <el-menu-item index="1-2">人才搜索</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span>职位管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="2-1">部门管理</el-menu-item>
        <el-menu-item index="2-2" @click="open('RecruitmentPage')">职位管理</el-menu-item>
        <el-menu-item index="2-3" @click="open('PubJobInfo')">发布职位</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-document"></i>
        <span>账户管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="3-1" @click="open('EnterprisePage')">单位首页</el-menu-item>
        <el-menu-item index="3-2" @click="open('EnterpriseBasePage')">基本资料</el-menu-item>
        <el-menu-item index="3-3">地图配置</el-menu-item>
        <el-menu-item index="3-4">密码管理</el-menu-item>
        <el-menu-item index="3-5">账号绑定</el-menu-item>
      </el-menu-item-group>
    </el-submenu>

  </el-menu>
</template>

<script>
export default {
  name: "PersonMenu",
  data(){
    return {
      isCollapse: false,
      isCollapseTransition:false,
      isUniqueOpened: false,
      verticalMode:'vertical',
      openeds:['1','2','3'],
      PersonInfoPage:'PersonInfoPage',
      ModifyPassword:'ModifyPassword'
    }
  },
  methods:{
    handleOpen(key, keyPath){
      console.log(key, keyPath);
    },
    handleClose(key, keyPath){
      console.log(key, keyPath);
    },
    open(url){
      this.$router.push("/"+url);
    }
  }
}
</script>

<style scoped>

</style>